﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using AD.Model;

/// <summary>
///WebUserPageBase 的摘要说明
/// </summary>
public class WebUserPageBase : WebForm
{
    public string GetKeyWordsStatus(KeyWordsStatus status)
    {
        if (status == KeyWordsStatus.Pass)
            return "<span style=\"color:#ff0000\">已审核</span>";
        else if (status == KeyWordsStatus.WaitPass)
            return "待审核";
        else
            return "不通过";
    }
    public UserMod SessionUser
    {
        get { return Session["user_session"] as UserMod; }
        set { Session["user_session"] = value; }
    }

    protected override void OnInit(EventArgs e)
    {
        string applicationPath = base.Request.ApplicationPath;
        if (!applicationPath.EndsWith("/"))
        {
            applicationPath = applicationPath + "/";
        }
        //登陆继续往下执行
        if (SessionUser == null)
        {
            string str2 = base.Request.RawUrl.ToString();
            AlertRedirect(null, string.Format("{0}Manager/Ad/index.html?url={1}", applicationPath, str2));
            //RedirectNewRedirectMethodURL(string.Format("{0}Manager/Ad/index.html?url={1}", applicationPath, str2));
            base.Response.End();
        }
        base.OnInit(e);
    }

}